﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddOrder.aspx.cs" Inherits="AddOrder" %>

<%@ Import Namespace="Bussiness.Interface" %>
<%@ Import Namespace="Bussiness.Service" %>
<%@ Import Namespace="Model" %>
<%@ Import Namespace="Common.Model" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="../../css/AddIframe.css" rel="stylesheet" />
    <link href="../../layui/css/layui.css" rel="stylesheet" />
</head>
<body>
    <%
        IBaseService baseService = new BaseService();
    %>
    <form class="layui-form" action="" id="AddOrderForm">
          <div class="layui-form-item">
            <label class="layui-form-label">用户名</label>
            <div class="layui-input-block">
                <select name="UserID" lay-verify="required">
                    <option value=""></option>
                    <%
                        Result<List<Users>> resultuser = baseService.Select<Users>();
                        if (resultuser.Success) {
                            List<Users> list = resultuser.Data;
                            foreach (var item in list)
                            {
                                %>
                                    <option value="<%=item.UserID%>"><%=item.UserName%></option>
                                <%
                            }
                        }

                    %>
                </select>
            </div>
        </div>
          <div class="layui-form-item">
            <label class="layui-form-label">图书名称</label>
            <div class="layui-input-block">
                <select name="BookID" lay-verify="required">
                    <option value=""></option>
                    <%
                        Result<List<Books>> resultbook = baseService.Select<Books>();
                        if (resultbook.Success) {
                            List<Books> list = resultbook.Data;
                            foreach (var item in list)
                            {
                                %>
                                    <option value="<%=item.BookID%>"><%=item.BookName%></option>
                                <%
                            }
                        }
                    %>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">数量</label>
            <div class="layui-input-inline">
                <input type="text" name="Num" required lay-verify="required" placeholder="请输入数量" autocomplete="off" class="layui-input">
            </div>
        </div>
       
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="AddOrder">添&nbsp;&nbsp;&nbsp;&nbsp;加</button>
                <button type="reset" class="layui-btn layui-btn-primary">重&nbsp;&nbsp;&nbsp;&nbsp;置</button>
            </div>
        </div>
    </form>
</body>
</html>
<script src="../../layui/layui.js"></script>
<script src="../../js/Add.js"></script>
